AsciiConvTable – Format

Format description for the ACT-version 1.0

English Version 1.0

Freeware

\begin{matrix}c \\ ◯ \end{matrix}1995-97 SciTech Software Development

CONTENTS

Contents

1 General 3

2 Legal issues 4 2.1 Copyright and copying of this archiv . . . . . . . . . . . . . . . . 4 2.2 Release of ACT-files . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.3 Example programs . . . . . . . . . . . . . . . . . . . . . . . . . . 4

3 Description of the ACT-format 5 3.1 Header part . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 3.2 Data part . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 3.3 Comment part . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

4 Example programs 8

5 Address of the author 9

1 GENERAL

1 General

Why external conversion tables?

When I recognized that there were errors in the TextConv Version 1.0 Macintosh conversion I realized that such mistakes only can be removed when this data is placed in an external file.

With this separation programmers and advanced useres have the possibility to remove errors themselves and are also able to change the conversion result to their own ideas.

Because of the fact that the charsets are not convertable 1:1 (for example the MS-DOS or ATARI graphic chars) there is a wide area that can be changed for personal ideas.

I decided not to write an additional program that allows also not advanced users to change the ACT-files because I think this causes more problems and mistakes instead of solving problems.

2 LEGAL ISSUES

2 Legal issues

2.1 Copyright and copying of this archiv

This archiv and the included files are Freeware, this means you can use and spread it for free. The restrictions for spreading are the same as for the program TextConv itself, so please refer the TextConv manual chapter 4.3 for details. The archiv may only be spreaded complete; the spreading or publishing of single files is strictly prohibited.

2.2 Release of ACT-files

To avoid problems and confusions some rules have to be obeyed.

Self-made ACT-files may be spreaded or released if the following conditions are fulfilled:

1. At the end of the ACT-file there must be a comment that mentions that it is not an original SciTech-ACT-file.

2. The released archiv has to contain a readme-file that

(a) mentions that it is not an original SciTech-ACT-file

(b) contains a short description that explains the differences to the respectiv original file.

3. If the archiv is released in the AmiNet it has to be placed into the same folder as TextConv (this is the directory util/conv). The AmiNetreadme-file has to mention that it is not an original SciTech archiv.

4. SciTech has to be informed about the release per writing or e-mail; a copy of the archiv is desired. The information has to be sent to the address of the author (see below).

ACT-files that only have been developed for private use doesn’t have any restrictions.

2.3 Example programs

The example programs included in this archiv may be used in any way; programs that uses parts of the code doesn’t have any restrictions. The spreading or release of the unchanged files without this archiv is strictly prohibited (see chapter 2.1)

3 DESCRIPTION OF THE ACT-FORMAT

3 Description of the ACT-format

An ACT-file contains at least 2 parts:

• the header part that contains the MagicBytes, the version number and the name of the table.

• the data part that carries the conversion informations.

These 2 parts must be included, additional the file can contain a comment at the end of the file.

Because the header and the data part have constant length, the length of the complete file without comments is constant (276 bytes). TextConv only loads these 276 bytes, so the comment has no restrictions to the length or contents of the comment part.

3.1 Header part

As mentioned above the length of the header part is always constant and amounts 20 bytes (position 0-19 dec., 0-13 hex.)

The structure is the following:

pos. abs: 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19
pos. rel: 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19
val. txt: S  C  T  A  C  T           A  T  A  R  I  2  A  N  S  I
val. hex: 53 43 54 41 43 54 01 00 20 41 54 41 52 49 32 41 4E 53 49 20

Descritpion of the respective positions:

Position Contents
0-5  MagicByte SCTACT
6  Version number (at the moment always 1 [UBYTE])
7  Subversion number (at the moment always 0 [UBYTE])
8  Blank (hex 20)
9-18  Name of the ACT-file (here as example: ATARI2ANSI)
19  Blank (hex 20)
20  start of the data part

MagicBytes: with the string SCTACT the file is identified as SciTech ASCII-Conversion-Table-file.

Version - and subversionnumber: at the moment always 1 and 0, other values results an error.

Name of the ACT-file (name string): this string depends always with the DOS-filename and has to be identically to a definite pattern. From the settings Read files as and Save files as TextConv chooses the respective file. The max. lenght of the name is 9 chars; shorter names have to be filled up with blanks.

Following names are possible at the moment:

File name  Name string

ansi2atari.act  ANSI2ATARI
ansi2ibm.act    ANSI2IBM
ansi2mac.act    ANSI2MAC
atari2ansi.act  ATARI2ANSI
atari2ibm.act   ATARI2IBM
atari2mac.act   ATARI2MAC
ibm2ansi.act    IBM2ANSI
ibm2atari.act   IBM2ATARI
ibm2mac.act     IBM2MAC
mac2ansi.act    MAC2ANSI
mac2atari.act   MAC2ATARI
mac2ibm.act     MAC2IBM

Example: If TextConv opens the file ansi2atari.act, the string ATARI2ANSI will be tested; if the string isn’t identically, TextConv reports an error.

3.2 Data part

The data part starts at position 20 (dec) and is always 256 bytes long.

Pos. abs: 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
Pos. rel: 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19
Value:    UBYTE-values corresponding to the coding scheme

The coding scheme is the following: The relative position is the ASCII-value of the source file; the value at this position is the ASCII-value of the source file.

Example: The ASCII-value 232 is read from the source file. The converted value can be found when the value from the absolute position 20+232=252 is read.

Because the first 127 chars are identically for all systems, the values of these chars are identically with the relative position, so these values mustn’t be changed in any way.

Please notice that the chars CR (13 dec.) and LF (10 dec.) are treated in a special way during the control char conversion so that these chars mustn’t be changed.

3.3 Comment part

Because TextConv ignores all chars after position 276, you can append a comment behind this position (notice that you have to append a comment if you want to publish your ACT-file!). As mentioned above this comment isn’n restricted in any way.

4 EXAMPLE PROGRAMS

4 Example programs

This archiv contains 2 example programs that shows the generation and the handling of ACT-files:

   • readconvtab.c
   • genconvtab.c

readconvtab.c is a code fragment of the original TextConv-code, that shows the way TextConv interprets ACT-files.

genconvtab.c is the original code that generated all original ACT- files included in the TextConv-archiv. With this program it’s very easy to create other ACT-files.

5 ADDRESS OF THE AUTHOR

5 Address of the author

SciTech Software Development Haas Alexander Mitterndorf 150 A-4801 Traunkirchen AUSTRIA

e-mail: scitech@ping.at
WWW: http://members.ping.at/scitech